﻿{% extends "forum/base.html" %}
{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng-nospam at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  Created on 2008-05-24.
  $Id: admin_forum.html 251 2008-10-27 15:06:45Z heavyzheng $
-->
{% endcomment %}

{#------------------------------------------------------------------------------------------------#}

{% block html_head %}

<title>Admin Dashboard :: Bug Garden Forum</title>

<script type="text/javascript">//<![CDATA[

  function submitAdminForm() {
    $("#admin .form").hide();
    $("#admin .submitting").show("slow");
    $("#admin form").submit();
  }

//]]></script>

{% endblock %}{# html_head #}

{#------------------------------------------------------------------------------------------------#}

{% block header %}

<div class="title">Admin Dashboard</div>

{% endblock %}{# header #}

{#------------------------------------------------------------------------------------------------#}

{% block navbar %}

<img src="/static/forum/images/home_icon.png" alt="Bug Garden Forum"/>
<a href="/forum/">Forum Home</a>
&#187;
<img src="/static/forum/images/admin_icon.png" alt="Admin"/>
Admin

{% endblock %}{# navbar #}

{#------------------------------------------------------------------------------------------------#}

{% block content %}

<div id="admin">

  <form action="." method="POST">
  
    <div class="section">
    
      <table class="bordered" cellspacing="0" width="100%">
      
        <tr class="head-row">
          <td class="nowrap" width="1%"></td>
          <td class="nowrap">Boards</td>
          <td class="nowrap" align="center" width="1%">Status</td>
          <td class="nowrap" align="center" width="1%">Threads</td>
          <td class="nowrap" align="center" width="1%">Posts</td>
          <td class="nowrap" align="center" width="1%">Manager(s)</td>
        </tr>
        
        {% for board in boards %}
          <tr class="{% cycle odd-row,even-row %}">
            <td class="nowrap">
              <input type="checkbox" name="boards" value="{{ board.key.id }}"/>
            </td>
            <td>
              <img src="/static/forum/images/board_icon.png" alt="Board"/>
              <b><a href="/forum/board/{{ board.key.id }}/">{{ board.name|escape }}</a></b>
              <br/>
              <span class="small">{{ board.desc|escape }}</span>
            </td>
            <td class="nowrap small" align="center" width="1%">
              {{ board.status }}
            </td>
            <td class="nowrap small" align="center" width="1%">
              {{ board.threads }}
            </td>
            <td class="nowrap small" align="center" width="1%">
              {{ board.posts }}
            </td>
            <td class="nowrap small" align="center" width="1%">
              {% for manager in board.managers %}
                <a href="#TODO">{{ manager.nickname }}</a><br/>
              {% endfor %}
            </td>
          </tr>
        {% endfor %}
      
      </table>
    
    </div><!--/.section-->
    
    <div class="section form">
      Change the status of the selected forum board(s) to:
      <select name="status">
        <option value="">:: select a status :: &nbsp;&nbsp;</option>
        <option value="Requested">Requested</option>
        <option value="Approved">Approved</option>
        <option value="Deleted">Deleted</option>
      </select>
      <br/>
      <input type="submit" name="submit" value="Change Status" onclick="submitAdminForm();"/>
    </div><!--/.form-->
    
    <div class="section submitting hidden">
      <img src="/static/forum/images/waiting.gif" alt="Submitting"/>
      Submitting your request... Please wait...
    </div><!--/.submitting-->
  
  </form>

</div><!--/#admin-->

{% endblock %}{# content #}



